package com.javayz.fileuploadanddownload.mapper;

import com.javayz.fileuploadanddownload.entity.Files;
import com.javayz.fileuploadanddownload.entity.all;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;


/**
 * @author by:
 * @ClassName: fileMapper
 * @Description: TODO
 * @Date:
 */
@Mapper
@Repository
public interface FileMapper {
    /**
     * 将数据信息插入到数据库
     * @param files
     */
    Integer insertFile(@Param("files") List<Files> files);

    /**
     * 根据id获取文件
     * @param sourcePk
     * @return
     */
    Files selectFileSourcePk( String filePath, String fileName, String sourcePk, String tableName);

    /**
     * 根据id获取文件
     * @param ids
     * @return
     */
    List<Files> selectFileById(@Param("list") String[] ids);

    List<String> selectAll(@Param("sourcePk") String sourcePk,@Param("tableName") String tableName ,@Param("filePathName") String filePathName);

    List<String> queryLists(String[] sourcePk);

    List<String> queryTableGcjsgl(String[] sourcePk);

    List<String> queryTableGcjbxx(String[] sourcePk);

    List<String> queryTableJhcbbz(String[] sourcePk);

    List<String> queryTableJscbbz(String[] sourcePk);

    List<String> queryTableSgkjxy(String[] sourcePk);

    List<String> queryTableSrfpdj(String[] sourcePk);

    List<String> queryTableWxf(String[] sourcePk);

    List<String> queryTableWxht(String[] sourcePk);

    List<String> queryTableWxjh(String[] sourcePk);

    List<String> queryTableWxjs(String[] sourcePk);

    List<String> queryTableWxkjxy(String[] sourcePk);

    List<String> queryTableXsht(String[] sourcePk);

    String selectAllTable(String tableName);

    Integer insertWxkjxy(all a);

    void insertXsht(all a);

    void insertGcjbxx(all a);

    void insertSgkjxy(all a);

    void insertJhcbbz(all a);

    void insertGcjsgl(all a);

    void insertJscbbz(all a);

    void insertWxjh(all a);

    void insertWxjs(all a);

    void insertSrfpdj(all a);

    void insertWxf(all a);

    void insertWxht(all a);

    void deleteWxkjxy(String source_pk);
    void deleteWxht(String source_pk);

    void deleteGcjbxx(String source_pk);

    void deleteSgkjxy(String source_pk);

    void deleteJhcbbz(String source_pk);

    void deleteGcjsgl(String source_pk);

    void deleteJscbbz(String source_pk);

    void deleteWxjh(String source_pk);

    void deleteWxjs(String source_pk);

    void deleteSrfpdj(String source_pk);

    void deleteWxf(String source_pk);

    void deleteXsht(String source_pk);

    String selectTableName(@Param("sourcePk") String sourcePk);

    all selectEngineeringNo(@Param("tableName") String tableName,@Param("sourcePk") String sourcePk);

    List<String> selectPathName(@Param("urlFile")String urlFile);

    Files selectVbillstatus(String id);

    void deleteVbillstatus(String id);

    all selectVbillstatuIds(String tableName,String sourcePk);

    String fileSuffixStr(String sourcePk,String fileName);
}
